]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
cleanup: Avoid useless return statements
authorFlorian Müllner <fmuellner@gnome.org>
Mon, 19 Aug 2019 19:37:15 +0000 (21:37 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Sun, 15 Sep 2019 14:02:45 +0000 (16:02 +0200)
Return statements are only useful if they return a value or break
the regular function flow (i.e. early returns). Remove all returns
that do neither.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/731

js/gdm/batch.js
js/ui/appDisplay.js
js/ui/main.js
js/ui/status/network.js
js/ui/windowManager.js

index 74af4f0a8e2d87a2b0289e686e0bfc276bbba04f..18662e379e7761817eb8a3cf7592da253c654f14 100644 (file)
@@ -202,7 +202,6 @@ var ConsecutiveBatch = class extends Batch {
                 hold.disconnect(signalId);
                 this.nextTask();
             });
-            return;
         } else {
             // This task finished, process the next one
             this.nextTask();
index 44caf1643a1e23cdd65b80f51b292d9d1e2d9115..b98781db08449f8c1cc4f3e2a736c9fe9e09f2b6 100644 (file)
@@ -752,7 +752,6 @@ var AllView = class AllView extends BaseAppView {
         let maxY = this._adjustment.upper - this._adjustment.page_size;
         if (dragEvent.y >= gridBottom && currentY < maxY) {
             this.goToPage(this._grid.currentPage + 1);
-            return;
         }
     }
 
index 4300dba670eea670bf013ec03db52f4ddb10b667..e8269f09be00a19beabe55b3f1d021169b0605b5 100644 (file)
@@ -705,7 +705,6 @@ function queueDeferredWork(workId) {
         _deferredWorkQueue.push(workId);
     if (data.actor.mapped) {
         _queueBeforeRedraw(workId);
-        return;
     } else if (_deferredTimeoutId == 0) {
         _deferredTimeoutId = GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, DEFERRED_TIMEOUT_SECONDS, () => {
             _runAllDeferredWork();
index 930a20ff52d213f73be18153e55abb672b62b517..5d939648f6a5e938ef80110f36fece4c390ca6c7 100644 (file)
@@ -1976,7 +1976,6 @@ var NMApplet = class extends PanelMenu.SystemIndicator {
             // or we get to full connectivity through other means
         } else if (result == PortalHelperResult.COMPLETED) {
             this._closeConnectivityCheck(path);
-            return;
         } else if (result == PortalHelperResult.RECHECK) {
             this._client.check_connectivity_async(null, (client, result) => {
                 try {
index 7559b6f30fb570d878220c35e582bf769c6cb149..3df1cd50836789af6d00714728df8ce37e6b8f41 100644 (file)
@@ -1022,7 +1022,6 @@ var WindowManager = class {
                                                 (proxy, error) => {
                                                     if (error) {
                                                         log(error.message);
-                                                        return;
                                                     }
                                                 });
 
@@ -1682,7 +1681,6 @@ var WindowManager = class {
             break;
         default:
             shellwm.completed_map(actor);
-            return;
         }
     }
 
@@ -1763,7 +1761,6 @@ var WindowManager = class {
             break;
         default:
             shellwm.completed_destroy(actor);
-            return;
         }
     }